CONTIKI_PROJECT = app-rpl-collect-only
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
TARGET ?= sky

APPS = deployment

CONFIG_NULLRDC=1
CONFIG_CONTIKIMAC=2
CONFIG_TSCH=3

DEPLOYMENT_COOJA=1
DEPLOYMENT_MOTES=2
DEPLOYMENT_TWIST=3
DEPLOYMENT_INDRIYA=4

CONFIG=$(CONFIG_TSCH)
#CONFIG=$(CONFIG_CONTIKIMAC)
#CONFIG=$(CONFIG_NULLRDC)

PANID ?= 0xABCD

CONTIKI_WITH_IPV6 = 1
CONTIKI_WITH_RPL = 1
CFLAGS+= -DCONFIG_NULLRDC=$(CONFIG_NULLRDC)
CFLAGS+= -DCONFIG_CONTIKIMAC=$(CONFIG_CONTIKIMAC)
CFLAGS+= -DCONFIG_TSCH=$(CONFIG_TSCH)
CFLAGS+= -DCONFIG=$(CONFIG)
ifdef CMD_DEP
CFLAGS+= -DDEPLOYMENT=$(CMD_DEP)
endif
CFLAGS+= -DCMD_IEEE802154_PANID=$(PANID)

ifneq ($(CONFIG),$(CONFIG_CONTIKIMAC))
CFLAGS+= -DWITHOUT_CONTIKIMAC
endif
CFLAGS+= -DWITHOUT_COMPOWER
CFLAGS+= -DWITHOUT_6LOWPAN_ATTR
CFLAGS+= -DWITHOUT_MAC_TX_ATTR
CFLAGS+= -DWITHOUT_ATTR_TX_POWER
CFLAGS+= -DWITHOUT_ATTR_RELIABLE
CFLAGS+= -DWITHOUT_ATTR_LINK_QUALITY
CFLAGS+= -DWITHOUT_ATTR_TIMESTAMP
CFLAGS+= -DWITHOUT_ATTR_FRAME_TYPE

PROJECTDIRS += tools
PROJECT_SOURCEFILES += node-id.c orchestra.c 

ifneq ($(TARGET),jn5168)
PROJECT_SOURCEFILES += uart1-putchar.c
endif

all: $(CONTIKI_PROJECT)

CONTIKI=../..
include $(CONTIKI)/Makefile.include

%.exe: %.sky
	cp $< $@
